﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Mimoza.GUI;

namespace Mimoza.TestPlugin
{
    public partial class TestPluginConfigPage : Mimoza.GUI.WizardPage
    {
        public TestPluginConfigPage()
        {
            InitializeComponent();
        }

        override public void Init()
        {
            if (null == this.Wizard.UserData as TestPluginData)
            {
                this.Wizard.UserData = new TestPluginData();
            }
            m_data = this.Wizard.UserData as TestPluginData;

            testCheckBox.Checked = m_data.Flag;
        }

        override public bool Try2LeavePage(WizardPageLeavingDirection direction)
        {
            if (direction != WizardPageLeavingDirection.Forward)
            {
                return true;
            }

            m_data.Flag = testCheckBox.Checked;

            return true;
        }

        private void checkBox1_CheckedChanged(object sender, EventArgs e)
        {
        }

        TestPluginData m_data;
    }
}
